package ClassTest.JDBCtest.service;

import ClassTest.JDBCtest.dao.JDBCDao;
import ClassTest.JDBCtest.domain.Nember;

import java.util.Scanner;

public class Service {
    private Scanner sc = new Scanner(System.in);
    private JDBCDao jdbcDao;
    public Service(JDBCDao jdbcDao){
        this.jdbcDao = jdbcDao;
    }
    public boolean insert(Nember nember){
        return jdbcDao.insert(nember);
    }

    public boolean delete(int n) {
        return jdbcDao.delete(n);
    }

    public boolean update(Nember nember) {
        return jdbcDao.update(nember);
    }

    public void close() {
        jdbcDao.close();
    }

    public boolean select(String s, boolean b) throws Exception {
        return jdbcDao.select(s,b);
    }
}
